﻿using UnityEngine;
using System.Collections;
using GoogleMobileAds.Api;

public class GoogleAdManager : MonoBehaviour {

    public string adUnitId = "";

    private BannerView bannerView;
	// Use this for initialization
	void Start () {
        bannerView = new BannerView(adUnitId, AdSize.Banner, AdPosition.Bottom);
        AdRequest request = new AdRequest.Builder().Build();
        
        bannerView.LoadAd(request);
	}

    void OnDestroy() {
        bannerView.Destroy();
    }
}
